home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / clients / bitmap / bitmap.h < prev    next >
C/C++ Source or Header  |  1994-08-12  |  9KB  |  269 lines

  1. /*
  2.  * $XConsortium: Bitmap.h,v 1.11 91/05/04 19:36:52 rws Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Davor Matic, MIT X Consortium
  24.  */
  25.  
  26.  
  27. #ifndef _Bitmap_h
  28. #define _Bitmap_h
  29.  
  30. /****************************************************************
  31.  *
  32.  * Bitmap widget
  33.  *
  34.  ****************************************************************/
  35.  
  36. #include <X11/Xaw/Simple.h>
  37.  
  38. /* Resources:
  39.  
  40.  Name             Class        RepType        Default Value
  41.  ----             -----        -------        ------------- 
  42.  background         Background        Pixel        XtDefaultBackground
  43.  foreground          Foredround         Pixel           XtDefaultForeground
  44.  highlight           Highlight          Pixel           XtDefaultForeground
  45.  frame               Frame              Pixel           XtDefaultForeground
  46.  border             BorderColor    Pixel        XtDefaultForeground
  47.  borderWidth         BorderWidth    Dimension    1
  48.  mappedWhenManaged   MappedWhenManaged    Boolean        True
  49.  resize              Resize             Boolean         True
  50.  sensitive         Sensitive        Boolean        True
  51.  width             Width        Dimension    0
  52.  height             Height        Dimension    0
  53.  size                Size               String          32x32
  54.  squareWidht         SquareWidht        Dimension       16
  55.  squareHeight        SquareHeight       Dimension       16
  56.  x             Position        Position    320
  57.  y             Position        Position    320
  58.  xHot                XHot               Position        NotSet
  59.  yHot                YHot               Position        NotSet
  60.  margin              Margin             Dimension       16
  61.  grid                Grid               Boolean         True
  62.  gridTolerance       GridTolerance      Dimension       8
  63.  dashed              Dashed             Boolean         True
  64.  dashes              Dashes             Bitmap          XtUnspecifiedPixmap
  65.  stippled            Stippled           Boolean         True
  66.  stipple             Sripple            Bitmap          XtUnspecifiedPixmap
  67.  proportional        Proportional       Boolean         True
  68.  axes                Axes               Boolean         True
  69.  button1Function     Button1Function    ButtonFunction  Set  
  70.  button2Function     Button2Function    ButtonFunction  Invert
  71.  button3Function     Button3Function    ButtonFunction  Clear
  72.  button4Function     Button4Function    ButtonFunction  Invert
  73.  button5Function     Button5Function    ButtonFunction  Invert
  74.  filename            Filename           String          None
  75.  basename            Basename           String          None
  76. */
  77.  
  78. /* define any special resource names here that are not in <X11/StringDefs.h> */
  79.  
  80. #define XtNbitmapResource "bitmapResource"
  81. #define XtNstipple "stipple"
  82. #define XtNstippled "stippled"
  83. #define XtNdashes "dashes"
  84. #define XtNdashed "dashed"
  85. #define XtNgrid "grid"
  86. #define XtNgridTolerance "gridTolerance"
  87. #define XtNaxes "axes"
  88. #define XtNbitmapSize "bitmapSize"
  89. #define XtNsize "size"
  90. #define XtNsquareWidth "squareWidth"
  91. #define XtNsquareHeight "squareHeight"
  92. #define XtNxHot "xHot"
  93. #define XtNyHot "yHot"
  94. #define XtNbutton1Function "button1Function"
  95. #define XtNbutton2Function "button2Function"
  96. #define XtNbutton3Function "button3Function"
  97. #define XtNbutton4Function "button4Function"
  98. #define XtNbutton5Function "button5Function"
  99. #define XtNfilename "filename"
  100. #define XtNbasename "basename"
  101. #define XtNmouseForeground "mouseForeground"
  102. #define XtNmouseBackground "mouseBackground"
  103. #define XtNframe "frame"
  104. #define XtNmargin "margin"
  105. #define XtNproportional "proportional"
  106.  
  107. #define XtCBitmapResource "BitmapResource"
  108. #define XtCHighlight "Highlight"
  109. #define XtCStipple "Stipple"
  110. #define XtCStippled "Stippled"
  111. #define XtCDashes "Dashes"
  112. #define XtCDashed "Dashed"
  113. #define XtCGrid "Grid"
  114. #define XtCGridTolerance "GridTolerance"
  115. #define XtCAxes "Axes"
  116. #define XtBitmapSize "BitmapSize"
  117. #define XtCSize "Size"
  118. #define XtCSquareWidth "SquareWidth"
  119. #define XtCSquareHeight "SquareHeight"
  120. #define XtCXHot "XHot"
  121. #define XtCYHot "YHot"
  122. #define XtCButton1Function "Button1Function"
  123. #define XtCButton2Function "Button2Function"
  124. #define XtCButton3Function "Button3Function"
  125. #define XtCButton4Function "Button4Function"
  126. #define XtCButton5Function "Button5Function"
  127. #define XtCFilename "Filename"
  128. #define XtCBasename "Basename"
  129. #define XtCFrame "Frame"
  130. #ifndef XtCMargin
  131. #define XtCMargin "Margin"
  132. #endif
  133. #define XtCProportional "Proportional"
  134.  
  135. #define XtRButtonFunction "ButtonFunction"
  136.  
  137. /* bitmap defines */
  138.  
  139. #define NotSet   -1
  140. #define Clear     0
  141. #define Set       1
  142. #define Invert    2
  143. #define Highlight 3
  144. #define On        True
  145. #define Off       False
  146.  
  147. #define XtClear "clear"
  148. #define XtSet "set"
  149. #define XtInvert "invert"
  150.  
  151. #define MarkRequest "MarkRequest"
  152. #define StoreRequest "StoreRequest"
  153. #define RestoreRequest "RestoreRequest"
  154. #define CopyRequest "CopyRequest"
  155. #define MoveRequest "MoveRequest"
  156. #define PointRequest "PointRequest"
  157. #define LineRequest "LineRequest"
  158. #define CurveRequest "CurveRequest"
  159. #define RectangleRequest "RectangleRequest"
  160. #define FilledRectangleRequest "FilledRectangleRequest"
  161. #define CircleRequest "CircleRequest"
  162. #define FilledCircleRequest "FilledCircleRequest"
  163. #define FloodFillRequest "FloodFillRequest"
  164. #define HotSpotRequest "HotSpotRequest"
  165. #define ZoomInRequest "ZoomInRequest"
  166. #define PasteRequest "PasteRequest"
  167. #define ImmediateCopyRequest "ImmediateCopyRequest"
  168. #define ImmediateMoveRequest "ImmediateMoveRequest"
  169.  
  170. /* bitmap exports */
  171.  
  172. extern Boolean BWEngageRequest();
  173. extern Boolean BWTreminateRequest();
  174.  
  175. extern void BWClearAll();
  176. extern void BWSetAll();
  177. extern void BWInvertAll();
  178. extern void BWUp();
  179. extern void BWDown();
  180. extern void BWLeft();
  181. extern void BWRight();
  182. extern void BWRotateRight();
  183. extern void BWRotateLeft();
  184. extern void BWSwitchGrid();
  185. extern void BWGrid();
  186. extern void BWSwitchDashed();
  187. extern void BWDashed();
  188. extern void BWSwitchAxes();
  189. extern void BWAxes();
  190. extern void BWDrawSquare();
  191. extern void BWDrawLine();
  192. extern void BWDrawRectangle();
  193. extern void BWDrawFilledRectangle();
  194. extern void BWDrawCircle();
  195. extern void BWDrawFilledCircle();
  196. extern void BWFloodFill();
  197. extern void BWMark();
  198. extern void BWMarkAll();
  199. extern void BWUnmark();
  200. extern void BWSelect();
  201. extern void BWUnmark();
  202. extern void BWStore();
  203. extern void BWStoreToBuffer();
  204. extern void BWUndo();
  205. extern void BWResize();
  206. extern void BWClip();
  207. extern void BWUnclip();
  208. extern void BWGrabSelection();
  209. extern void BWRequestSelection();
  210. extern void BWSetChanged();
  211. extern Boolean BWQueryChanged();
  212. extern int BWReadFile();
  213. extern int BWWriteFile();
  214. extern String BWUnparseStatus();
  215. extern String BWGetFilename();
  216. extern String BWGetBasename();
  217. extern void BWChangeBasename();
  218. extern void BWRemoveAllRequests();
  219. extern void BWClearHotSpot();
  220. extern Boolean BWQueryMarked();
  221. extern void BWFold();
  222. extern void BWClear();
  223. extern void BWSet();
  224. extern void BWInvert();
  225. extern void BWFlipHoriz();
  226. extern void BWFlipVert();
  227. extern void BWClearMarked();
  228. extern Boolean BWAddRequest();
  229. extern void BWChangeNotify();
  230. extern Pixmap BWGetUnzoomedPixmap();
  231. extern void BWClearChanged();
  232. extern Boolean BWQueryStored();
  233. extern Boolean BWQueryStippled();
  234. extern void BWSwitchStippled();
  235. extern void BWRedrawMark();
  236. extern Boolean BWQueryAxes();
  237. extern void BWHighlightAxes();
  238. extern void BWChangedFilename();
  239. extern String BWGetFilepath();
  240. extern void BWZoomOut();
  241. extern void BWZoomMarked();
  242. extern void BWRescale();
  243. extern Boolean BWQueryZooming();
  244. extern void BWRedrawGrid();
  245. extern void BWRedrawSquares();
  246. extern void BWRedrawHotSpot();
  247. extern Boolean BWQueryGrid();
  248. extern Boolean BWQueryDashed();
  249. extern Boolean BWQueryProportional();
  250. extern void BWSwitchProportional();
  251. extern void BWDrawGrid();
  252. extern void BWChangeFilename();
  253. extern Boolean BWParseSize();
  254.  
  255. typedef struct _BWRequestRec BWRequestRec;
  256. typedef char *BWRequest;
  257.  
  258. /* declare specific BitmapWidget class and instance datatypes */
  259.  
  260. typedef struct _BitmapClassRec *BitmapWidgetClass;
  261. typedef struct _BitmapRec      *BitmapWidget;
  262. /* declare the class constant */
  263.  
  264. extern WidgetClass bitmapWidgetClass;
  265.  
  266. #endif /* _Bitmap_h */
  267.  
  268.  
  269.